﻿<%@ Page Language="C#" MasterPageFile="~/master/AdminLayout.master" AutoEventWireup="true" CodeFile="subscriberlist.aspx.cs" Inherits="admin_subscriberlist" Title="Untitled Page" %>
<%@ Register Src="~/control/common/EmptyGridMessage.ascx" TagPrefix="ucc" TagName="EmptyGridMessage" %>
<%@ Register Assembly="Library" Namespace="Pheonix.CodeLibrary.Web" TagPrefix="ucc" %>
<%@ Register Assembly="App_Code" Namespace="Pheonix.Fashionzoomer.UI" TagPrefix="ucc" %>

<asp:Content ID="workArea" ContentPlaceHolderID="WorkArea" Runat="Server">
    <table width="95%" style="margin-left:auto;margin-right:auto;" border="0">
        <tr>
            <td>
                <ucc:ResponseMessage ID="uccResponseMessage" runat="server" ></ucc:ResponseMessage>
            </td>
        </tr>
        <tr>
            <td style="height:50px;" valign="middle" align="left">
                <h2>Available Subscribes</h2>
            </td>
        </tr>
        <tr>
            <td align="center" valign="top">
                <asp:GridView ID="subscribeList" runat="server" DataSourceID="subscribeListData" AllowPaging="true" GridLines="None" BorderWidth="0px"
                    AllowSorting="true" AutoGenerateColumns="false" PageSize="10" DataKeyNames="Id" OnRowCommand="subscribeList_RowCommand" 
                    OnRowDataBound="subscribeList_RowDataBound" SkinID="AdminList" >
                    <Columns>   
                        <asp:BoundField DataField="Id" HeaderText="#" SortExpression="id" />
                        <asp:BoundField DataField="Email" HeaderText="Subscriber Email" SortExpression="email" />
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                Delete
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:ImageButton ID="deleteButton" AlternateText="delete" ImageUrl="~/image/row_delete.gif"
                                    runat="server" CommandName="deleteCommand" />
                            </ItemTemplate>               
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                <asp:CheckBox runat="server" ID="selectAll" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="rowSelect" />
                            </ItemTemplate>                
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <ucc:EmptyGridMessage ID="emptyGridMessage" runat="server" />
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        <tr><td style="height:40px;">&nbsp;</td></tr>
        <tr>
            <td align="center" valign="bottom">
                <asp:ImageButton ID="deleteAllButton" runat="server" SkinID="ListDeleteAllButton"
                    OnClick="deleteAllButton_Click" />
            </td>
        </tr>
    </table>

    <asp:ObjectDataSource ID="subscribeListData" runat="server" EnablePaging="true" 
        TypeName="Pheonix.Fashionzoomer.Entity.SqlServer2000.Subscribe" SelectMethod="GetAllSubscribePaged"
        SelectCountMethod="GetAllSubscribePagedCount" DeleteMethod="DeleteSubscribe" SortParameterName="orderBy"
        StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows">
        <SelectParameters>
            <asp:Parameter Name="orderBy" Type="String" />
            <asp:Parameter Name="startRowIndex" Type="Int32" />
            <asp:Parameter Name="maximumRows" Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:ControlParameter ControlID="subscribeList" Name="id" />
        </DeleteParameters>   
    </asp:ObjectDataSource>
    
</asp:Content>


